Intelligent lock that can set a key code by itself, a key which can be used for many locks and a setting tool thereof

ABSTRACT

The present invention relates to an intelligent lock that can set a key code by itself, and to a key which can be used for many locks. The present invention also related a setting tool. Wherein the key includes a housing ( 1 ), a battery ( 2 ), a head ( 5 ), a group of contacts ( 4 ) provided on the head ( 5 ) and storing means ( 6 ). The contacts for power supply and data transmission are connected to the two ends of the battery through the wires respectively, the storing means is a non-volatile memory, and a special key code is stored in the memory. The present invention aims at providing an intelligent lock system that can easily set or cancel a key code by itself, and in which only one key can replace many keys, even all kinds of keys. Moreover, the cost is low and people can use it easily.

FIELD OF THE INVENTION

[0001] The present invention relates to an intelligent electronic lockcontrolled by a microcomputer. The present invention can be widely usedin civil and industrial fields such as doors, drawers, cabinets, boxes,bags, transportation means, machineries and so on.

BACKGROUND OF THE INVENTION

[0002] Since locks were invented, locks have been playing an importantrole in people's daily life. Up to now, locks have two categories. Oneis mechanical lock and the other is electronic lock. The mechanical lockhas simple structure and low cost. However, the mechanical lock has badsecurity and high interactive opening rates. In addition, one lock canonly be opened by one key. Because of the development of modemmicro-electronic technology, the electronic lock was invented on thebasis of the mechanical lock. The electronic lock can increase thesecurity of lock and the interactive opening rate has almost reduced tozero. In addition, one electronic card can open many locks of the samekind. However, current electronic lock cannot set the key itself, and itneeds a desktop outside of the lock body to set the key. Therefore, theelectronic lock is not applicable in fields where the desktop is notavailable (such as a family door) or where people could not use computer(such as people at countryside, children or elder people). Later, thefingerprint electronic lock was invented on the basis of the normalelectronic lock. Though it is easy to open lock without a key, thefingerprint electronic lock is expensive, in large volume, andcomplicated in setting and resetting of fingerprints. In addition, boththe normal electronic lock and the fingerprint lock need battery orpower supply inside the lock, which can increase their volume. For suchreasons, the electronic lock can only be used for doors, but not fordrawers, cabinets, boxes, bags, transportation means, machinery, etc.,where volume is limited. Moreover, the expiration time period of abattery is about 1 to 1.5 years. If the battery in the electronic lockhas not been changed on time because of negligence, the lock may not beopened anymore and it will be unpleasant to pick the lock or break thedoor.

[0003] Conclusively, current existing locks including mechanical andelectronic ones, or even fingerprint electronic locks, have so manydisadvantages as mentioned above. In addition, they have no way to besimplified for one finger.

SUMMARY OF THE INVENTION

[0004] The object of the invention is to overcome disadvantages of locksmentioned above, and to provide an easy way to set or cancel the key bythe user himself. The present invention can unify all keys used to openvarious kinds of multi-purpose locks including door locks, drawer locks,cabinet locks, box and bag locks, traffic means locks, and machinerylocks, etc., into one intelligent electronic lock with low cost and easyoperation.

[0005] The technical solution of the invention is as follows:

[0006] The invention discloses an intelligent lock system comprising:

[0007] an electronic key including

[0008] a housing (1),

[0009] a battery (2),

[0010] a head (5),

[0011] a storing means (6), said storing means (6) including anon-volatile memory which can store a special key code, and

[0012] a group of contacts (4) setting on the head (5), said group ofcontacts including a plurality of contacts; said contacts are used forpower supply and data transmission, and are connected with two poles ofthe battery (2) and the storing means (6) by wires respectively; and

[0013] an intelligent lock including

[0014] a housing (8),

[0015] a lock hole (7),

[0016] a lock tongue (9),

[0017] a latch mechanism (10),

[0018] a driving mechanism (11),

[0019] a driving component (12),

[0020] an electrical circuit board (15),

[0021] a group of contacts (17) for electrical connection with theelectrical key, and

[0022] a lock hole body (18),

[0023] wherein the electrical circuit board (15) is electricallyconnected with the driving component (12) and the group of contacts(17), said group of contacts (17) being set inside the lock hole (7) andused for power supply and data transmission, said electrical circuitboard (15) including a storing means (13) for storing a plurality of keycodes and a control device (16) for controlling opening of the lock andmaking setting or cancel operations upon the key,

[0024] wherein said control device (16) can read a key code stored inthe connected key by the group of contacts (17) and check whether thekey code stored in the connected key is identical with one of the keycodes in the storing means (13), and if a result is identical, saidcontrol device (16) can drive the driving component (12) to open thelock,

[0025] wherein said control device (16) can receive special signals andexecute the setting or cancel operations of the electronic key accordingto the received special signals, and

[0026] wherein there is only one of the intelligent lock and theelectronic key that can include a switch device by which a user canexecute different operations and accordingly generate different specialsignals.

[0027] According to one embodiment, the control device (16) can connectan electronic key which can open the lock via the lock hole (7) andreceive the first special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can store the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to the mark.

[0028] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7)and receive a second special signal and clear out all key codes of thekeys stored in the storing means (13) based on the second specialsignal.

[0029] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7)and receive a third special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can cancel the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to the mark.

[0030] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7)and receive a fourth special signal and clear out all key codes of thekeys stored in the storing means (13) based on the second specialsignal.

[0031] According to one embodiment of the invention, the lock can be bigor small or for any purposes, and the shape, size, structure and themanner of electrical connection of the lock hole 7 are completelyidentical. Inside the lock, there is no battery or any power supply. Thepower supply can be provided by the key. The different key codes storedin the storing means 13 are generated when the lock is setting upondifferent keys respectively.

[0032] Said setting upon one key means giving a key the right to openone lock and storing the key code of said key into the memory of thestoring means 13 of said lock. The process of setting can be referred asthe registration of the key code of the key in the lock. According toone embodiment of the invention, only the key which has been registeredin the lock can open the lock, thus the process to open the lock is theprocess that the control device 16 in the lock makes check and confirmsthe key. Of course, the registration of the key can be cancelled thusthe process to cancel one key is the process that the control device 16in the lock clears out the key code of the key from the memory so as tocancel the right of the key to open the lock.

[0033] Accordingly, the necessary condition to open one lock by one keyis to make registration of the key code of the key in the lock.Therefore, the size of the storing content of the storing means 13 inthe lock decides how many keys can be registered in one lock. If thelength of the key code is 56 bits in a binary coded system, one lock canmake registration of over ten thousand of keys based on presenttechnical level of the storing means (EEPROM).

[0034] According to one embodiment of the invention, said key can matcha lock which is big or small or for any purpose. The shape, size,structure and the manner of electrical connection of the head 5 arecompletely identical. The key code of the key is previously stored inthe storing means of the key when it is manufactured. The length of thekey code can be decided according to the need of security. If the lengthof the key code is designed at 56 bits in binary coded system, thelength can be as larger as several hundred quadrillion in the decimalcoded system.

[0035] Therefore, it is almost impossible to have same key codes for anytwo keys and each key will have its unique key code.

[0036] In order to increase the security, the storing means 6 can berealized by a chip of microcomputer, which has functions of storage andcalculation. The key code is stored in the memory of the microcomputerand its operation mode has the protocol with the control device 16 inthe lock when it is manufactured. As a result, the original key codeinside the key is operated and secured by the microcomputer, and will beidentified by the lock and will be difficult to be decoded.

[0037] It is clear that for any key, no new data will be needed to writeinto the key after it is manufactured. Therefore, the key can open asmany locks as needed.

[0038] The different lock systems are constructed by different settingand cancel manners. Based on the invention, though each key will haveits unique key code, it is not necessary that each key can only open aspecified lock after it is manufactured. Similarly, for each lock, it isnot necessary that each lock can only match a specified key. The key andlock in the invention can be in combination or separation at the user'sdiscretion. Among a lot of locks and a lot of keys, any key can be setas the key of any lock, and can be cancelled at any time as well. Thecombination of the key and the lock can be decided by the setting andcancel of the lock at user's discretion.

[0039] The invention further discloses an intelligent lock systemcomprising:

[0040] an electronic key including

[0041] a housing (1),

[0042] a battery (2),

[0043] a head (5),

[0044] a storing means (6), said storing means (6) including anon-volatile memory which can store a special key code, and

[0045] a group of contacts (4) setting on the head (5), said group ofcontacts including a plurality of contacts; said contacts are used forpower supply and data transmission, and are connected with two poles ofthe battery (2) and the storing means (6) by wires respectively; and

[0046] an intelligent lock including

[0047] a housing (8),

[0048] a lock hole (7),

[0049] a lock tongue (9),

[0050] a latch mechanism (10),

[0051] a driving mechanism (I 1),

[0052] a driving component (12),

[0053] an electrical circuit board (15),

[0054] a group of contacts (17) for electrical connection with theelectrical key, and

[0055] a lock hole body (18),

[0056] wherein the electrical circuit board (15) is electricallyconnected with the driving component (12) and the group of contacts(17), said group of contacts (17) being set inside the lock hole (7) andused for power supply and data transmission, said electrical circuitboard (15) including a storing means (13) for storing a plurality of keycodes and a control device (16) for controlling opening of the lock andmaking setting or cancel operations upon the key,

[0057] wherein said control device (16) can read a key code stored inthe connected key by the group of contacts (17) and check whether thekey code stored in the connected key is identical with one of the keycodes in the storing means (13), and if a result is identical, saidcontrol device (16) can drive the driving component (12) to open thelock,

[0058] wherein said control device (16) can receive special signals andexecute the setting or cancel operations of the electronic key accordingto the received special signals, and a connector which is used to makeelectrical connection between the group of contacts of at least twoelectronic keys and the group of contacts (17) inside the lock hole (7),said connector including a housing (19), a plug (23) which can insertinto the lock hole (7), at least a first hole (20) and a second hole(21) in which key can be inserted, wherein the plug (23) has a group ofcontacts (22), and the first hole (20) and the second hole (22) includecorresponding contacts,

[0059] wherein there is only one of the intelligent lock, electronic keyand connector that can include a switch device by which a user canexecute different operations and accordingly generate different specialsignals, and

[0060] wherein when the connector is inserted into the lock hole (7),the control device (16) can read two key codes of two electronic keysinserted into the first hole (20) and the second hole (21) respectively,and when one of the key codes of keys is identical with the key codestored in the storing means (13), said control device (16) can store thekey code of the other key into the storing means (13).

[0061] The invention further disclosed an intelligent lock systemcomprising:

[0062] an electronic key including

[0063] a housing (1),

[0064] a battery (2),

[0065] a head (5),

[0066] a storing means (6), said storing means (6) including anon-volatile memory which can store a special key code, and

[0067] a group of contacts (4) setting on the head (5), said group ofcontacts including a plurality of contacts; said contacts are used forpower supply and data transmission, and are connected with two poles ofthe battery (2) and the storing means (6) by wires respectively; and

[0068] an intelligent lock including

[0069] a housing (8),

[0070] a lock hole (7),

[0071] a lock tongue (9),

[0072] a latch mechanism (10),

[0073] a driving mechanism (11),

[0074] a driving component (12),

[0075] an electrical circuit board (15),

[0076] a group of contacts (17) for electrical connection with theelectrical key, and

[0077] a lock hole body (18),

[0078] wherein the electrical circuit board (15) is electricallyconnected with the driving component (12) and the group of contacts(17), said group of contacts (17) being set inside the lock hole (7) andused for power supply and data transmission, said electrical circuitboard (15) including a storing means (13) for storing a plurality of keycodes and a control device (16) for controlling opening of the lock andmaking setting or cancel operations upon the key,

[0079] wherein said control device (16) can read a key code stored inthe connected key by the group of contacts (17) and check whether thekey code stored in the connected key is identical with one of the keycodes in the storing means (13), and if a result is identical, saidcontrol device (16) can drive the driving component (12) to open thelock,

[0080] wherein said control device (16) can receive special signals andexecute the setting or cancel operations of the electronic key accordingto the received special signals, a setting tool used together with anelectronic key and an intelligent lock, said setting tool including

[0081] a housing (25),

[0082] a keyhole (26),

[0083] a connecting device (28) having one plug, and

[0084] an integrated circuit (24) having a memory unit,

[0085] wherein the plug has a group of contacts (27) connecting with alock hole (7) of the intelligent lock when it is inserted, and a groupof contacts (27) in the keyhole (26) connecting with the connects of theplug and the integrated circuit (24) which has a preset key code of thesetting tool,

[0086] wherein the storing means (13) includes a special memory unit forstoring the key code of the setting tool, and

[0087] wherein there is only one of the intelligent lock, electronic keyand the setting tool that can include a switch device by which a usercan execute different operations and accordingly generate differentspecial signals.

[0088] According to one embodiment. the control device (16) can read thekey code of connected setting tool by the group of contacts (17) andcheck whether the key code of the setting tool is identical with the keycode of stored in the special memory unit of the storing means (13), ifidentical, the control device (16) shall execute setting or canceloperation upon the key or upon the setting tool at the same time basedon received special signal.

[0089] According to another embodiment, when the setting tool isinserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26), if the intelligent lockcan confirm the key code of the setting tool, the key code of theelectronic key inserted into the keyhole (26) of the setting tool shallbe stored into the intelligent lock.

[0090] According to another embodiment, when the setting tool isinserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26), if the intelligent lockcan confirm the key code of the setting tool, depending on differentspecial signals the control device (16) can clear out the key code ofthe key connected with the intelligent lock or clear out all key codesof all keys.

[0091] According to another embodiment, the setting operation of thesetting tool is to store the key code of the setting tool inserted intothe lock into the storing means (13); and the cancel operation of thesetting tool is to clear out the key code of the setting tool insertedinto the lock from the storing means (13).

[0092] According to another embodiment, when the setting tool isinserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26), if the storing means (13)has no key code the setting tool, the control device (16) shall storethe key code of the setting tool into the special memory unit of thestoring means (13).

[0093] The invention further discloses an intelligent lock systemcomprising:

[0094] an electronic key including

[0095] a housing (1),

[0096] a battery (2),

[0097] a head (5),

[0098] a storing means (6), said storing means (6) including anon-volatile memory which can store a special key code, and

[0099] a group of contacts (4) setting on the head (5), said group ofcontacts including a plurality of contacts; said contacts are used forpower supply and data transmission, and are connected with two poles ofthe battery (2) and the storing means (6) by wires respectively; and

[0100] an intelligent lock including

[0101] a housing (8),

[0102] a lock hole (7),

[0103] a lock tongue (9),

[0104] a latch mechanism (10),

[0105] a driving mechanism (11),

[0106] a driving component (12),

[0107] an electrical circuit board (15),

[0108] a group of contacts (17) for electrical connection with theelectrical key, and

[0109] a lock hole body (18),

[0110] wherein the electrical circuit board (15) is electricallyconnected with the driving component (12) and the group of contacts(17), said group of contacts (17) being set inside the lock hole (7) andused for power supply and data transmission, said electrical circuitboard (15) including a storing means (13) for storing a plurality of keycodes and a control device (16) for controlling opening of the lock andmaking setting or cancel operations upon the key,

[0111] wherein said control device (16) can read a key code stored inthe connected key by the group of contacts (17) and check whether thekey code stored in the connected key is identical with one of the keycodes in the storing means (13), and if a result is identical, saidcontrol device (16) can drive the driving component (12) to open thelock, and

[0112] a multi-digit switch device connected with the control device(16) by which the user can enter a multi-digit key code into the controldevice (16), the storing means (13) having a special key code unit whichis used to set or cancel the key, wherein the control device (16) shallaccept and check if the special key cord inputted by the multi-digitswitch device is identical with that stored in the storing means (13),and execute setting or cancel operations of corresponding electronickey.

[0113] The invention further discloses a setting tool used together withan electronic key and an intelligent lock, comprising:

[0114] a housing (25),

[0115] a keyhole (26),

[0116] a connecting device (28) having one plug, and

[0117] an integrated circuit (24) having a memory unit,

[0118] wherein the plug has a group of contacts (27) connecting with alock hole (7) of the intelligent lock when it is inserted, and a groupof contacts (27) in the keyhole (26) connecting with the connects of theplug and the integrated circuit (24) which has a preset key code of thesetting tool.

[0119] According to one embodiment of the invention, the setting toolcomprises a switch device which can be operated by a user, and cangenerate special signals on the group of contacts (27) corresponding todifferent operations executed by the user.

[0120] The invention further discloses a method for setting upon anelectronic key by an intelligent lock, said electronic key having abattery and a special key code, said intelligent lock having key codesof all electronic keys which can open the lock, said method comprising:

[0121] 1) acquiring power supply from at least one electronic key whichis connected with the intelligent lock;

[0122] 2) judging a key code of the at least one electronic key if it isidentical with one of key codes previously stored in the intelligentlock, if the key code of at least one electronic key is identical withone of key codes stored in the intelligent lock, allowing setting orcancel operation upon the electronic key; and

[0123] 3) executing corresponding setting or cancel operation by theintelligent lock upon the electronic key based on the special signal tomake setting or cancel operation.

[0124] According to one embodiment, the executing setting or canceloperation uses the electrically connection of a medium connecting devicebetween the at least one electronic key and the intelligent lock.

[0125] According to another embodiment, one of the intelligent lock,electronic key, and connector includes a switch device by which a usercan execute different operations and accordingly generate differentspecial signals.

[0126] The invention further discloses a method for setting operationupon an electronic key by an intelligent lock, the electronic key havinga battery and a special key code, the intelligent lock having key codesof all electronic keys which can open the lock and the key code of asetting tool, the setting tool being connected with the intelligent lockand the electronic key, said method comprising:

[0127] (1) acquiring power supply from the electronic key which isconnected with the intelligent lock;

[0128] (2) judging the key code of the setting tool if it is identicalwith one of key codes of the setting tool previously stored in theintelligent lock, if the key code of the setting tool is identical withthe key codes of the setting tool stored in the intelligent lock,allowing setting or cancel operation upon the electronic key and uponitself;

[0129] (3) executing setting or cancel operation.

[0130] According to one embodiment, when the setting operation isexecuted and when the setting tool is inserted into the lock hole of theintelligent lock and there is an electronic key inserted into thekeyhole (26) of the setting tool, if the intelligent lock has stored thekey code of the setting tool, the key code of the electronic key whichis inserted into the insert hole of the setting tool (26) shall bestored into the intelligent lock.

[0131] According to another embodiment, when the cancel operation isexecuted and when the setting tool is inserted into the lock hole of theintelligent lock and there is an electronic key inserted into thekeyhole (26) of the setting tool, if the intelligent has stored the keycode of the setting tool, depending on different special signals thecontrol device (16) can clear out the key code of the key connected withthe intelligent lock, clear out all key codes of all keys, or clear outall key codes of all keys and the code of the setting tool.

[0132] According to another embodiment, when the setting tool isinserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26), if the storing means (13)has no key code the setting tool, the control device (16) shall storethe key code of the setting tool into the special memory unit of thestoring means (13).

[0133] According to another embodiment, the special signal is generatedby a user from a switch device of the electronic key, the intelligentlock or the setting tool.

[0134] Based on different habit and mentality of people to use the lock,the setting and cancel manners of the key are accordingly different.Therefore, the invention provides four embodiments based on differentsetting and cancel manners:

[0135] 1. The first embodiment of the system—key setting key (offlinemode)

[0136] The user may use key to set key in offline mode by inserting thekey into an intelligent lock. According to the first embodiment, astoring means 13 of the lock includes a power-failure reserve memorywhich is used to store manual operation signal (i.e. special signal)generated before there is power failure. Meanwhile, there is only oneswitch device 3 mounted on the lock or on the key in the system, whichis used to generate manual operation signal (i.e. special signal) and isconnected with its electrical circuit.

[0137] 2. The second embodiment of the system—key setting key (onlinemode)

[0138] The user may use key to set key in online mode by a lock and aconnector which can connect corresponding contacts in parallel on theirheads 5. The connector is used specially to set the key. The connectorincludes a housing 19, a plug 23, a first hole 20, a second hole 21 anda group of contacts 22, which is distributed on the plug 23 and on theinner walls of the first hole 20 and the second hole 21. The shape,size, structure, positions of contacts and the manner of electricalconnection of the plug 23 are completely identical with that of the head5 of the key. The shape, size, structure, positions of contacts and themanner of electrical connection of the first hole 20 and the second hole21 are completely identical with that of the lock hole 7. The contactsdistributed on the plug 23 and the contacts distributed on the same holeare insulated from each other and corresponding contacts of the threecomponents are connected in parallel by wires.

[0139] The control device 16 in the lock includes an inquiry identifierwhich is used to inquire and identify if there is a second source ofdata input. Meanwhile, there is only one switch device 3 mounted on thelock, on the key or on the connector, which is used to generate manualoperation signal and is connected with its electrical circuit.

[0140] 3. The third embodiment of the system—setting the key by thesetting tool

[0141] Based on the second embodiment, the user may combine theconnector and one of the keys into a whole, and remove the battery 2 inthe key to simplify the structure. The connection style of allcomponents in the electrical circuit is unchanged so that a setting toolwhich is specially used to set the key is formed. The setting toolincludes a housing 25, and the connecting device 28, and an integratedcircuit 24 which stores the key code of the setting tool and isconnected with the connecting device 28.

[0142] Obviously, the third embodiment is similar with the secondembodiment except the mechanical structure. The control device 16includes an inquiry identifier which is used to inquire and identify ifthere is a second source of data input. Meanwhile, there is only oneswitch device 3 mounted on the lock, on the key or on the setting tool,which is used to generate manual operation signal and is connected withthe electrical circuit.

[0143] 4. The fourth embodiment of the system—setting the key by themulti-digit switch

[0144] The user may set the key by a multi-digit switch. The multi-digitswitch device 3 on the lock is connected with the control device 16 toform an electrical circuit in the system. The multi-digit switch device3 includes some independent switch devices which are combined into awhole, and each independent switch device can generate different data bysetting its buttons manually. These data can be binary coded system,decimal coded system or otherwise. The independent switch device of eachbit is connected accordingly with the input port of parallel data on thecontrol device 16 by the electrical circuit board 15. Such switchdevices are connected respectively with some input ports of paralleldata on the control device 16. Since the working state of eachindependent switch device is generated manually, a set of suchindependent switch devices can form a variable data generator, or a keycode generator or a second source of data input.

[0145] The advantages of the invention are as follows:

[0146] 1. Since each key has its unique key code instead that theordinal electronic lock has its only lock code, the lock shall check thekey code of the key stored into the lock instead that the ordinalelectronic lock shall check the lock code stored into the key. Thus thevolume requirement of the storing means in the key to store data islargely reduced, and it is possible for one key to open unlimited locks.

[0147] 2. Since no data are needed to write into the key when the key ismanufactured, the setting and cancel of the key can be completed by alock. Thus it is possible, easy and convenient to set or cancel the keyon each lock.

[0148] 3. Since no battery or power supply is needed in the lock, theunpleasant case to be forced to pick the lock or break the door due tofailure of the battery or power supply can be avoided.

[0149] 4. Since no battery or power supply is needed in the lock, thevolume of the lock can be largely reduced. Thus an electronic lock canbe popularized in those places where the volume of the lock is confined(e.g. drawers, cabinets, boxes, bags, transportation means, machineriesand so on).

[0150] 5. Since the key can transmit the key code and have certainmechanical strength, it can be suitable not only for the lock with thehandle to transmit the key code only, but also for the lock without thehandle to transmit the key code and to drive the lock tongue to open thelock. The habit and mentality of people to use the lock can remain.

BRIEF DESCRIPTION OF THE DRAWINGS

[0151] The present invention is illustrated by way of example and notintended to be limited by the figures of the accompanying drawings inwhich like references indicate similar elements and in which:

[0152]FIG. 1 is the sectional view of the structure of the electronickey according to one embodiment of the invention;

[0153]FIG. 2 is the sectional view of the structure of the intelligentlock according to another embodiment of the invention;

[0154]FIG. 3 is a block diagram of an electrical circuit according to afirst embodiment of the invention in which a switch device 3 is mountedon one side of the key and is connected with a storing means 6;

[0155]FIG. 4 is the block diagram of the electrical circuit according tothe first embodiment of the invention in which the switch device 3 ismounted on one side of the lock;

[0156]FIG. 5 is the block diagram of the electrical circuit according tothe first embodiment of the invention in which the switch device 3 ismounted on one side of the key and is connected with contacts in thegroup of contacts 4;

[0157]FIG. 6 is the flow chart of a control device 16 according to thefirst embodiment of the invention;

[0158]FIG. 7 is the cubic sectional view of the connector according to asecond embodiment of the invention;

[0159]FIG. 8 is the cubic sectional view of the setting tool accordingto a third embodiment of the invention;

[0160]FIG. 9 is the block diagram of the electrical circuit according tothe second embodiment of the invention in which the switch device 3 ismounted on one side of the key;

[0161]FIG. 10 is the block diagram of the electrical circuit accordingto the second embodiment of the invention in which the switch device 3is mounted on one side of the connector;

[0162]FIG. 11 is the flow chart of the control device 16 according tothe second and the third embodiment of the invention;

[0163]FIG. 12 is the block diagram of the electrical circuit accordingto the third embodiment of the invention;

[0164]FIG. 13 is the block diagram of the electrical circuit accordingto a fourth embodiment of the invention;

[0165]FIG. 14 is the flow chart of the control device 16 according tothe fourth embodiment of the invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

[0166] According to one embodiment, said setting operation of theelectronic key is to store the key code of the connected electronic keyinto the storing means (13) so that said electronic key can open thelock.

[0167] According to another embodiment, said cancel operation upon theelectronic key is to clear out the key codes stored in the storing means(13) so that the electronic keys corresponding to these key codes couldnot open the lock; or to clear out the key code of the connected key inthe storing means (13) so that the key corresponding to the key codecould not open the lock.

[0168] According to another embodiment, the intelligent lock furthercomprises a switch device operated by a user, said switch device beingconnected with the control device (16) and generating special signalscorresponding to different operations by the user, said control device(16) executing setting or cancel operations corresponding to the keyaccording to said special signal.

[0169] According to another embodiment, the control device (16) canreceive the special signal from the electronic key.

[0170] According to another embodiment, the control device (16) canreceive the special signal from a setting tool.

[0171] According to another embodiment, the storing means (13) includesa special memory unit for storing the key code of the setting tool.

[0172] According to another embodiment, the control device (16) can readthe key code of connected setting tool by the group of contacts (17) andcheck whether the key code of the setting tool is identical with the keycode of stored in the special memory unit of the storing means (13), ifidentical, the control device (16) shall execute setting or canceloperation upon the key or upon the setting tool at the same time basedon received special signal.

[0173] According to another embodiment, the setting operation of thesetting tool is to store the key code of the setting tool inserted intothe lock into the storing means (13) so that the control device (16)executes setting or cancel operation upon the setting tool or upon thekey connected with the setting tool based on received special signal;and the cancel operation of the setting tool is to clear out the keycode of the setting tool inserted into the lock from the storing means(13) so that the control device (16) could not execute setting or canceloperation upon the setting tool or the key connected with the settingtool.

[0174] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7)and receive the first special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can store the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to the mark.

[0175] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7)and receive a second special signal and clear out all key codes of thekeys stored in the storing means (13) based on the second specialsignal.

[0176] According to another embodiment, the intelligent lock furthercomprises a connector which is used to make electrical connectionbetween the group of contacts of at least two electronic keys and thegroup of contacts (17) inside the lock hole (7), said connectorincluding a housing (19), a plug (23) which can insert into the lockhole (7), at least a first hole (20) and a second hole (21) in which keycan be inserted, wherein the plug (23) has a group of contacts (22), andthe first hole (20) and the second hole (22) include correspondingcontacts.

[0177] According to another embodiment, the connector further includes aswitch device which can be operated by a user and can generate specialsignals on the group of contacts (22) corresponding to differentoperations by the user.

[0178] According to another embodiment, when the connector is insertedinto the lock hole (7), the control device (16) can read two key codesof two electronic keys inserted into the first hole (20) and the secondhole (21) respectively, and when one of the key codes of keys isidentical with the key code stored in the storing means (13), saidcontrol device (16) can store the key code of the other key into thestoring means (13).

[0179] According to another embodiment, the intelligent lock furthercomprises a multi-digit switch device by which the user can entermulti-digit key code into the control device (16), said switch devicebeing connected with the control device (16) which can execute settingor cancel operations of corresponding electronic key based on thespecial key code entered into the multi-digit switch device.

[0180] According to another embodiment, the setting tool furthercomprises a switch device which can be operated by a user, and cangenerate special signals on the group of contacts (27) corresponding todifferent operations executed by the user.

[0181] According to another embodiment, the intelligent lock systemfurther comprises a setting tool used together with an electronic keyand an intelligent lock, said setting tool including

[0182] a housing (25),

[0183] a keyhole (26),

[0184] a connecting device (28) having one plug, and

[0185] an integrated circuit (24) having a memory unit,

[0186] wherein the plug has a group of contacts (27) connecting with alock hole (7) of the intelligent lock when it is inserted, and a groupof contacts (27) in the keyhole (26) connecting with the connects of theplug and the integrated circuit (24) which has a preset key code of thesetting tool,

[0187] wherein when the setting tool is inserted into the lock hole ofthe intelligent lock and there is an electronic key inserted into thekeyhole (26), if the intelligent lock can confirm the key code of thesetting tool, the key code of the electronic key inserted into thekeyhole (26) of the setting tool shall be stored into the intelligentlock; and

[0188] wherein when the setting tool is inserted into the lock hole ofthe intelligent lock and there is an electronic key inserted into thekeyhole (26), if the intelligent lock can confirm the key code of thesetting tool, depending on different special signals the control device(16) can clear out the key code of the key connected with theintelligent lock or clear out all key codes of all keys.

[0189] According to another embodiment, the control device (16) can readthe key code of connected setting tool by the group of contacts (17) andcheck whether the key code of the setting tool is identical with the keycode of stored in the special memory unit of the storing means (13), ifidentical, the control device (16) shall execute setting or canceloperation upon the key or upon the setting tool at the same time basedon received special signal.

[0190] According to another embodiment, the setting operation of thesetting tool is to store the key code of the setting tool inserted intothe lock into the storing means (13) so that the control device (16)executes setting or cancel operation upon the setting tool or upon thekey connected with the setting tool based on received special signal;and the cancel operation of the setting tool is to clear out the keycode of the setting tool inserted into the lock from the storing means(13) so that the control device (16) could not execute setting or canceloperation upon the setting tool or the key connected with the settingtool.

[0191] According to another embodiment, when the setting tool isinserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26), if the storing means (13)has no key code the setting tool, the control device (16) shall storethe key code of the setting tool into the special memory unit of thestoring means (13).

[0192] According to another embodiment, the intelligent lock systemfurther comprises a connector which is used to make electricalconnection between the group of contacts of at least two electronic keysand the group of contacts (17) inside the lock hole (7), said connectorincluding a housing (19), a plug (23) which can insert into the lockhole (7), at least a first hole (20) and a second hole (21) in which keycan be inserted, wherein the plug (23) has a group of contacts (22), andthe first hole (20) and the second hole (22) include correspondingcontacts.

[0193] According to another embodiment, there is only one of theintelligent lock, electronic key, setting tool and connector, caninclude a switch device by which a user can execute different operationsand accordingly and generate different special signals.

[0194] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7)and receive the first special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can store the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to another embodiment the mark.

[0195] According to another embodiment, the control device (16) canconnect an electronic key which can open the lock via the lock hole (7),and when the control device (16) receives a third special signal, thecontrol device (16) shall clear out all key codes of keys stored in thestoring means (13), and shall store the key code of the next electronickey which is inserted after drawing out the previous key into thestoring means (13).

[0196] 1. One embodiment of the Structure of the Key

[0197] As shown on FIG. 1, a storing means 6 is an EEPROM-like memory,and a switch device 3 can be included depending on the differenttechnical solutions.

[0198] 2. One embodiment of the Structure of the Lock

[0199] As shown on FIG. 2, a storing means 13 is an EEPROM-like memory,and a control device 16 is a microcomputer (e.g. Series 89 etc.) onwhich the program is introduced. According to another embodiment, thestoring means 13 and the control device 16 can be an integrated circuitwhich merges the storing means 13 and the microcomputer. The switchdevice 3 can be included depending on the different technical solutions.In one embodiment shown as FIG. 2, if the setting and cancel operationsof the key are not in consideration, the rule of opening the lock is asfollows. When a head 5 of the key is inserted into a lock hole 7, abattery 2 in the key shall provide power supply to the lock via a groupof contacts 4 and 17 by wires. The control device 16 of the system shallfirst ask for key codes when it is energized. The key shall input keycodes stored in the storing means 6 via the group of contacts 4 and 17into the control device 16. Then a data comparator in the control device16 shall make comparison one by one between the key code of the key andthose registered in the storing means 13. If none of registered keycodes is identical with the key code of the key, the control device 16will enter into the sleep mode and ignore the key. If one registered keycode is identical with the key code of the key, the control device 16shall output a timing pulse power supply to a driving component 12. Thedriving component 12 can be a motor or a magnet, and can transfer thedirection and form of the torque by a driving mechanism 11 to drive alatch mechanism 10 to make parallel motion so that the lock tongue 9 isshifted. At this time, when the user turns the key to drive the lockhole 7, the extension bar on the right side of the lock hole 7 shallbring the lock tongue 9 to move downward to open the lock. Once thetiming power supply outputted from the control device 16 to the drivingcomponent 12 reaches its preset time, the driving component 12 shall bedeenergized and the latch mechanism 10 shall press the lock tongue 9under the push of the spring. At this time, when the user turns the keyin reverse direction to rise up the lock tongue to a certain position,the left side of the latch mechanism 10 shall drop in to the recess ofthe lock tongue 9 again so that the lock is closed.

[0200] Of course, similar to current existing mechanical locks, it isalso completely practicable to use a handle to drive the lock hole 7 oruse a handle to directly drive the lock tongue to open or close thelock.

[0201] 3. First embodiment of the key-lock system

[0202] The block diagrams of the electrical circuit of the firstembodiment of the system are shown as in FIG. 3, FIG. 4 and FIG. 5.According to the first embodiment, the switch device 3 is used togenerate manual operation signal in the system. The installationposition of the switch device 3 is flexible in the system. For example,the switch device 3 can be mounted on the key side to connect with thestoring means 6 (shown on FIG. 3), or to connect with correspondingcontacts on the group of contacts 4 on the head 5 (shown on FIG. 5), sothat the signal inputted by the key can be changed when it is switchedon or off by manual operation. The switch device 3 can be also mountedon the lock to connect with one data input terminal (shown on FIG. 4) ofthe control device 16 to change its input state by manual operation. Asshown at FIG. 3, the switch device 3 is set on the key. The signalgenerated by manual operation on the switch device 3 and transmitted tothe control device 16 is called manual operation signal. In addition,there is a power-failure reserve memory on the storing means 13, whichis used to store manual operation signal generated before the there is apower-failure.

[0203] According to the first embodiment, the setting and canceloperations of the key are executed by the switch device 3. Setting andcancel signals can be generated by different manual operations forcompletion. According to the first embodiment, the setting of the key isdesigned as follows. The user inserts a key A which can open the lockinto the lock hole 7 to open the lock, makes the switch device 3 to beswitched on or off three times within 3 seconds, and withdraws the key Afrom the lock hole, so that the key code of a key B which originallycannot open the key is registered into the lock unconditionally and thekey B can open the lock. Meanwhile, the cancel of the key is designed asfollows. The user uses the key A to open the lock and makes the switchdevice 3 to be switched on or off continuously over 10 seconds, so thatall key codes stored in the key code memory of the lock (including thekey code of key A itself) shall be cleared off. At this time, though allkey codes in the key code memory are cleared off, the system canunconditionally register the key code of any new key inserting in thelock, thus the new key shall acquire the right of setting and cancel thelock. Of course the new key can give up such a right.

[0204] The lock made according to the first embodiment shall not needany defined key for match when the lock is manufactured.

[0205]FIG. 6 is the flow chart of the control device 16 according to thefirst embodiment. When the key is inserted into the lock hole 7, thewhole system is energized and initialized. The control device 16 shallfirst ask for key codes of the key, and store the data inputted by thekey into the cache A of the storing means 6. A data comparator of thecontrol device compares one by one between the data in the cache A andthose registered in the storing means 13. If one key code is identicalwith the data in the cache A, the power-failure reserve memory shall becleared and a timing pulse power supply to open the lock shall beoutputted to drive the driving element 12 to complete the action to openthe lock. A detection identifier shall make detection and identificationupon possible manual operation signals, that is to detect and identifywhether the switch device 3 is operated by a person. If that is thecase, the detection identifier shall identify which kind operation itis. If it is the setting operation of the key, the detection identifiershall set registration mark on the power-failure reserve memory. If itis the cancel operation of the key, the detection identifier shall clearoff all key codes stored in the key code memory in the storing means 13,and then set registration mark on the power-failure reserve memory. Ifmanual operation signal cannot be identified, the detection identifiershall detect continuously. If none of key codes in the key code memoryis identical with the data in the cache A in previous comparison, thepower-failure reserve memory shall be checked if there is registeredmark. If not, the system shall enter into the sleep mode. If yes, thedata in the cache A shall be stored in the key code memory and theregistered mark in the power-failure reserve memory shall then becleared off.

[0206] 4. Second embodiment of the key-lock system

[0207] The block diagrams of the electrical circuit of the key-locksystem are shown as FIG. 9 and FIG. 10. In the FIGS. 9 and 10, two keysare connected in parallel with the lock by a connector. The cubicsectional view of one embodiment of the connector is shown in FIG. 7.Similar to the first embodiment, there is a switch device 3 to generatemanual operation signal. The installation position of the switch device3 is flexible. For example, the switch device 3 can be mounted on thekey (shown on FIG. 9) or on the connector (shown on FIG. 10), so that itcan change the signal inputted by the key when it is switched by manualoperation. The switch device 3 can also be mounted on the lock (Figureis omitted) to connect with one data input terminal of the controldevice 16 to change its input state by manual operation. FIG. 10 showsthat the switch device 3 is set on the connector. In addition, thecontrol device 16 can include an inquire identifier to inquire andidentify whether there is a second source of data input.

[0208] According to the second embodiment of the invention, the user canuse one key A which can open the lock to set the lock so that key B canopen the lock as well. The user inserts two keys respectively into afirst hole 20 and a second hole 21 of the connector, and then inserts aplug 23 of the connector into the lock hole 7. At this time batteries intwo keys are connected in parallel to provide power supply to thesystem. When the system is energized, it shall register the key code ofthe key B into the lock unconditionally, so that the key B can then alsoopen the lock. Meanwhile, the cancel mode of the key is designed asfollows. The user inserts the key A which can open the lock into anyhole of the connector, and inserts the plug 23 of the connector into thelock hole. The switch device 3 of the connector can be switched on oroff continuously over 10 seconds, so that all key codes stored in thekey code memory of the lock except the key code of the key A shall becleared off. Therefore, only the key A can open the lock. According tothe second embodiment, there should be at least one key which can bematched with the lock and open it. Of course, the second embodiment canadopt a similar mode of the cancel with the first embodiment and doesnot need any defined key for match.

[0209]FIG. 11 is the flow chart of the control device 16 of the systemin the second embodiment of the key-lock system. Referring to FIG. 11,when two keys are connected with the lock by the connector, the systemis switched on and initialized. The inquire identifier in the controldevice 16 inquires and identifies if there is the second source of inputdata in the system. If the result of the inquiry is that there are 2sources of input data, the control device 16 will read the key code ofthe first key inserted into one insert hole of the connector and storethe key code into cache A. A comparator compares one by one between thedata in the cache A and those in the key code memory in the storingmeans 13. If the key code in the memory is identical with the data inthe cache A, the key code of the second key inserted into the anotherinsert hole will be stored into the cache B on the microcomputer 16.Then the data in the cache B will be stored into the storing means 13,so that the registration of the second key is completed. If none of thedata in the cache A is identical with the data in the key code memoryafter comparison, the key code of the second key inserted into theanother insert hole will be stored into the cache B, and the comparatorcompares one by one between the data in the cache B and those in the keycode memory. If one of data is identical with that in the cache B, thendata in the cache A shall be stored into the key code memory, so thatthe registration of the first key is completed. If none data in thecache B is identical with the data in the key code memory aftercomparison, it suggests that neither key can open the lock and thesystem shall enter into the sleep mode.

[0210] When only one key is connected into the system by the connector,the system is setup and the inquiry identifier shall inquire andidentify if there is the second source of data input in the system andthe result of inquiry shall be: “Only One”. The input data from the keywill be stored into the cache A. The comparator shall compares one byone between the data in the cache A and those in the key code memory. Ifnone of data is identical with the data in the cache A, the system shallenter into the sleep mode. If one of data is identical with that in thecache A, a timing pulse power supply to open the lock shall be outputtedto drive the driving element 12 to complete the action to open the lock.The detection identifier then makes detection and identification uponpossible manual operation signals, that is, to detect and identifywhether the switch device 3 is operated by a person. If somebody isoperating on the switch device 3 and operation requirements are met, alldata in the key code memory which are not identical with that in thecache A shall be cleared off. Therefore, all other key codes shall becancelled except the key code meeting operation requirements. If nomanual operation signal occurs in the system or the manual operationsignals are not in accordance with the requirement, the detectionidentifier shall detect continuously.

[0211] 5. Third embodiment of key-lock system

[0212] The third embodiment of the system is a mechanical structuredeformation of the second embodiment of the system. FIG. 12 is a blockdiagram of the electrical circuit of third embodiment of the system. Inaddition, the cubic sectional view of the setting tool is shown on FIG.8. Referring to FIG. 8, the setting tool includes a housing 25, anintegrated circuit 24, a connecting device 28, an insert hole 26, agroup of contacts 27 and wires. The group of contacts 27 distribute oninner walls of the connecting device 28 and the insert hole 26, and areinsulated from each other. The connecting device 28 takes the form ofthe plug. The connecting device 28 and the insert hole 26 are completelyidentical with the plug 23 and the first hole 20 or the second hole 21in the second embodiment regarding shape, size, structure, positions ofcontacts and the manner of electrical connection. The integrated circuit24 stores the key code of the setting tool and is connected with theconnecting device 28. The key code of the setting tool is previouslystored into the lock.

[0213] According to the third embodiment of the system, the user insertsthe head 3 of the key into the insert hole 26 of the setting tool, theninserts the connecting device 28 into the lock hole 7. Thus, the keycode of the key is registered into the lock unconditionally and the keycan open the lock. The style to cancel the key according to the thirdembodiment is the same with that according to the second embodiment. Forexample, when the switch device 3 is operated by person to be switchedon or off continuously over 10 seconds, all key codes stored in the keycode memory of the lock except the key code of the setting tool shall becleared off. Thus all other keys cannot open the lock. After the lock ismanufactured according to the third embodiment, there should be at leastone defined setting tool which can be matched with the lock. Of course,the third embodiment can adopt similar mode of the cancel with the firstembodiment and does not need any defined setting tool for match.

[0214] As shown on FIG. 12, the key, the lock and the setting tool areconnected in parallel to form the electrical circuit of the system. Incase when the electrical circuit is fixed, it is obviously that thesetting tool can be combined with the lock or with the key, so that thestructure of the setting tool can be changed into a way that the inserthole 26 can be omitted while the connecting device 28 can be changedinto a connector in other form. That is, there should be correspondingconnector on concerned lock or key to match with the connecting device.When the key is inserted into the lock, the setting tool shall beconnected with corresponding connector on the lock or on the key.

[0215] Similar with the first and the second embodiments of the system,there is a switch device 3 to generate manual operation signal in thesystem. The installation position of the switch device 3 is flexible. Itcan be mounted on the key or the lock (Figure is omitted), or mounted onthe setting tool. Here the switch device 3 is mounted on the settingtool (shown on FIG. 12). In addition, there is an inquire identifier inthe control device 16 to inquire and identify if there is a secondsource of data input. Therefore, the third embodiment and the secondembodiment are identical except the structure.

[0216] 6. The fourth embodiment of the key-lock system

[0217] Referring to FIG. 13, a multi-digit switch device 3 is connectedwith the control device 16. According to the fourth embodiment, twokinds of codes are stored previously into the microcomputer 16 or thestoring means 13 of the lock when the lock is manufactured. One code isthe setting code. To set the key, the user sets the data manually on themulti-digit switch device 3 to make them to be identical with thesetting code previously stored in the lock. Thus the key inserted intothe lock is registered into the lock unconditionally, and the key canthen open the lock. The other code is the cancel code. The user may setthe data manually on the multi-digit switch device 3 to make them to beidentical with the cancel code previously stored in the lock. Thus thekey inserted into the lock should open the lock, and all data stored inthe key code memory in the lock are cleared off. The multi-digit switchdevice 3 is mounted on the electrical circuit board 15. According to thefourth embodiment, the multi-digit switch device 3 has binary codesystem on each bit (only two states OFF and ON at the binary codeswitch). Whatever the setting or cancel of the key is finished, theoperator should set the switch randomly and keep the code in mind toprevent the code to be stolen by others.

[0218]FIG. 14 is the flow chart of the control device 16 according tothe fourth embodiment of the system. When the key is inserted into thelock hole 7, the system is energized and initialized. The control device16 reads the key code inputted by the key, and stores the data into thecache A. A data comparator compares one by one between the data in thecache A and those registered data in the key code memory in the storingmeans 13. If one key code is identical with the data in the cache A, thetiming pulse power supply to open the lock shall be outputted to drivethe driving element 12 to open the lock. The detection identifier thenmakes detection and identification upon the data formed by themulti-digit switch device 3 to check if it is identical with the cancelcode. If not identical, the system shall enter into the sleep mode. Ifidentical, all key codes in the key code memory shall be cleared off. Ifnone of the data in the cache A is identical with the data in the keycode memory after comparison by the comparator, the detection identifiershall detect and identify the data formed by the multi-digit switchdevice 3 to check if it is identical with the setting code. If notidentical, the system shall go into sleep mode. If identical, the datein the cache A shall be stored into the key code memory to completesetting of the key.

[0219] Therefore, the invention includes four embodiments. Depending ondifferent habit and mentality of people to use the lock, themanufacturer can select one or several embodiments.

1. a group of contacts (4) setting on the head (5), said group ofcontacts including a plurality of contacts; said contacts are used forpower supply and data transmission, and are connected with two poles ofthe battery (2) and the storing means (6) by wires respectively; and anintelligent lock including a housing (8), a lock hole (7), a lock tongue(9), a latch mechanism (10), a driving mechanism (11), a drivingcomponent (12), an electrical circuit board (15), a group of contacts(17) for electrical connection with the electrical key, and a lock holebody (18), wherein the electrical circuit board (15) is electricallyconnected with the driving component (12) and the group of contacts(17), said group of contacts (17) being set inside the lock hole (7) andused for power supply and data transmission, said electrical circuitboard (15) including a storing means (13) for storing a plurality of keycodes and a control device (16) for controlling opening of the lock andmaking setting or cancel operations upon the key, wherein said controldevice (16) can read a key code stored in the connected key by the groupof contacts (17) and check whether the key code stored in the connectedkey is identical with one of the key codes in the storing means (13),and if a result is identical, said control device (16) can drive thedriving component (12) to open the lock, wherein said control device(16) can receive special signals and execute the setting or canceloperations of the electronic key according to the received specialsignals, and wherein there is only one of the intelligent lock and theelectronic key that can include a switch device by which a user canexecute different operations and accordingly generate different specialsignals.
 2. The intelligent lock system according to claim 1, whereinthe control device (16) can connect an electronic key which can open thelock via the lock hole (7) and receive the first special signal and seta corresponding mark in one non-volatile memory unit on the electricalcircuit board (15) so that the control device (16) can store the keycode of a second electronic key which is inserted after drawing out theprevious key into the storing means (13) according to the mark.
 3. Theintelligent lock system according to claim 1, wherein the control device(16) can connect an electronic key which can open the lock via the lockhole (7) and receive a second special signal and clear out all key codesof the keys stored in the storing means (13) based on the second specialsignal.
 4. The intelligent lock system according to claim 1, wherein thecontrol device (16) can connect an electronic key which can open thelock via the lock hole (7) and receive a third special signal and set acorresponding mark in one non-volatile memory unit on the electricalcircuit board (15) so that the control device (16) can cancel the keycode of a second electronic key which is inserted after drawing out theprevious key into the storing means (13) according to the mark.
 5. Theintelligent lock system according to claim 1, wherein the control device(16) can connect an electronic key which can open the lock via the lockhole (7) and receive a fourth special signal and clear out all key codesof the keys stored in the storing means (13) based on the second specialsignal.
 6. An intelligent lock system comprising: an electronic keyincluding a housing (1), a battery (2), a head (5), a storing means (6),said storing means (6) including a non-volatile memory which can store aspecial key code, and a group of contacts (4) setting on the head (5),said group of contacts including a plurality of contacts; said contactsare used for power supply and data transmission, and are connected withtwo poles of the battery (2) and the storing means (6) by wiresrespectively; and an intelligent lock including a housing (8), a lockhole (7), a lock tongue (9), a latch mechanism (10), a driving mechanism(11), a driving component (12), an electrical circuit board (15), agroup of contacts (17) for electrical connection with the electricalkey, and a lock hole body (18), wherein the electrical circuit board(15) is electrically connected with the driving component (12) and thegroup of contacts (17), said group of contacts (17) being set inside thelock hole (7) and used for power supply and data transmission, saidelectrical circuit board (15) including a storing means (13) for storinga plurality of key codes and a control device (16) for controllingopening of the lock and making setting or cancel operations upon thekey, wherein said control device (16) can read a key code stored in theconnected key by the group of contacts (17) and check whether the keycode stored in the connected key is identical with one of the key codesin the storing means (13), and if a result is identical, said controldevice (16) can drive the driving component (12) to open the lock,wherein said control device (16) can receive special signals and executethe setting or cancel operations of the electronic key according to thereceived special signals, and a connector which is used to makeelectrical connection between the group of contacts of at least twoelectronic keys and the group of contacts (17) inside the lock hole (7),said connector including a housing (19), a plug (23) which can insertinto the lock hole (7), at least a first hole (20) and a second hole(21) in which key can be inserted, wherein the plug (23) has a group ofcontacts (22), and the first hole (20) and the second hole (22) includecorresponding contacts, wherein there is only one of the intelligentlock, electronic key and connector that can include a switch device bywhich a user can execute different operations and accordingly generatedifferent special signals, and wherein when the connector is insertedinto the lock hole (7), the control device (16) can read two key codesof two electronic keys inserted into the first hole (20) and the secondhole (21) respectively, and when one of the key codes of keys isidentical with the key code stored in the storing means (13), saidcontrol device (16) can store the key code of the other key into thestoring means (13).
 7. An intelligent lock system comprising: anelectronic key including a housing (1), a battery (2), a head (5), astoring means (6), said storing means (6) including a non-volatilememory which can store a special key code, and a group of contacts (4)setting on the head (5), said group of contacts including a plurality ofcontacts; said contacts are used for power supply and data transmission,and are connected with two poles of the battery (2) and the storingmeans (6) by wires respectively; and an intelligent lock including ahousing (8), a lock hole (7), a lock tongue (9), a latch mechanism (10),a driving mechanism (11), a driving component (12), an electricalcircuit board (15), a group of contacts (17) for electrical connectionwith the electrical key, and a lock hole body (18), wherein theelectrical circuit board (15) is electrically connected with the drivingcomponent (12) and the group of contacts (17), said group of contacts(17) being set inside the lock hole (7) and used for power supply anddata transmission, said electrical circuit board (15) including astoring means (13) for storing a plurality of key codes and a controldevice (16) for controlling opening of the lock and making setting orcancel operations upon the key, wherein said control device (16) canread a key code stored in the connected key by the group of contacts(17) and check whether the key code stored in the connected key isidentical with one of the key codes in the storing means (13), and if aresult is identical, said control device (16) can drive the drivingcomponent (12) to open the lock, wherein said control device (16) canreceive special signals and execute the setting or cancel operations ofthe electronic key according to the received special signals, a settingtool used together with an electronic key and an intelligent lock, saidsetting tool including a housing (25), a keyhole (26), a connectingdevice (28) having one plug, and an integrated circuit (24) having amemory unit, wherein the plug has a group of contacts (27) connectingwith a lock hole (7) of the intelligent lock when it is inserted, and agroup of contacts (27) in the keyhole (26) connecting with the connectsof the plug and the integrated circuit (24) which has a preset key codeof the setting tool, wherein the storing means (13) includes a specialmemory unit for storing the key code of the setting tool, and whereinthere is only one of the intelligent lock, electronic key and thesetting tool that can include a switch device by which a user canexecute different operations and accordingly generate different specialsignals.
 8. The intelligent lock system according to claim 7, whereinthe control device (16) can read the key code of connected setting toolby the group of contacts (17) and check whether the key code of thesetting tool is identical with the key code of stored in the specialmemory unit of the storing means (13), if identical, the control device(16) shall execute setting or cancel operation upon the key or upon thesetting tool at the same time based on received special signal.
 9. Theintelligent lock system according to claim 7, wherein when the settingtool is inserted into the lock hole of the intelligent lock and there isan electronic key inserted into the keyhole (26), if the intelligentlock can confirm the key code of the setting tool, the key code of theelectronic key inserted into the keyhole (26) of the setting tool shallbe stored into the intelligent lock.
 10. The intelligent lock systemaccording to claim 7, wherein when the setting tool is inserted into thelock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the intelligent lock can confirm thekey code of the setting tool, depending on different special signals thecontrol device (16) can clear out the key code of the key connected withthe intelligent lock or clear out all key codes of all keys.
 11. Theintelligent lock according to claim 8, wherein the setting operation ofthe setting tool is to store the key code of the setting tool insertedinto the lock into the storing means (13); and the cancel operation ofthe setting tool is to clear out the key code of the setting toolinserted into the lock from the storing means (13).
 12. The intelligentlock system according to claim 7 or 11, wherein when the setting tool isinserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26), if the storing means (13)has no key code the setting tool, the control device (16) shall storethe key code of the setting tool into the special memory unit of thestoring means (13).
 13. An intelligent lock system comprising: anelectronic key including a housing (1), a battery (2), a head (5), astoring means (6), said storing means (6) including a non-volatilememory which can store a special key code, and a group of contacts (4)setting on the head (5), said group of contacts including a plurality ofcontacts; said contacts are used for power supply and data transmission,and are connected with two poles of the battery (2) and the storingmeans (6) by wires respectively; and an intelligent lock including ahousing (8), a lock hole (7), a lock tongue (9), a latch mechanism (10),a driving mechanism ( 1), a driving component (12), an electricalcircuit board (15), a group of contacts (17) for electrical connectionwith the electrical key, and a lock hole body (18), wherein theelectrical circuit board (15) is electrically connected with the drivingcomponent (12) and the group of contacts (17), said group of contacts(17) being set inside the lock hole (7) and used for power supply anddata transmission, said electrical circuit board (15) including astoring means (13) for storing a plurality of key codes and a controldevice (16) for controlling opening of the lock and making setting orcancel operations upon the key, wherein said control device (16) canread a key code stored in the connected key by the group of contacts(17) and check whether the key code stored in the connected key isidentical with one of the key codes in the storing means (13), and if aresult is identical, said control device (16) can drive the drivingcomponent (12) to open the lock, and a multi-digit switch deviceconnected with the control device (16) by which the user can enter amulti-digit key code into the control device (16), the storing means(13) having a special key code unit which is used to set or cancel thekey, wherein the control device (16) shall accept and check if thespecial key cord inputted by the multi-digit switch device is identicalwith that stored in the storing means (13), and execute setting orcancel operations of corresponding electronic key.
 14. A setting toolused together with an electronic key and an intelligent lock,comprising: a housing (25), a keyhole (26), a connecting device (28)having one plug, and an integrated circuit (24) having a memory unit,wherein the plug has a group of contacts (27) connecting with a lockhole (7) of the intelligent lock when it is inserted, and a group ofcontacts (27) in the keyhole (26) connecting with the connects of theplug and the integrated circuit (24) which has a preset key code of thesetting tool.
 15. The setting tool according to claim 14, furthercomprising a switch device which can be operated by a user, and cangenerate special signals on the group of contacts (27) corresponding todifferent operations executed by the user.
 16. A method for setting uponan electronic key by an intelligent lock, said electronic key having abattery and a special key code, said intelligent lock having key codesof all electronic keys which can open the lock, said methodcomprising: 1) acquiring power supply from at least one electronic keywhich is connected with the intelligent lock; 2) judging a key code ofthe at least one electronic key if it is identical with one of key codespreviously stored in the intelligent lock, if the key code of at leastone electronic key is identical with one of key codes stored in theintelligent lock, allowing setting or cancel operation upon theelectronic key; and 3) executing corresponding setting or canceloperation by the intelligent lock upon the electronic key based on thespecial signal to make setting or cancel operation.
 17. The methodaccording to claim 16, wherein the executing setting or cancel operationuses the electrically connection of a medium connecting device betweenthe at least one electronic key and the intelligent lock.
 18. The methodaccording to claim 16, wherein one of the intelligent lock, electronickey, and connector includes a switch device by which a user can executedifferent operations and accordingly generate different special signals.19. A method for setting operation upon an electronic key by anintelligent lock, the electronic key having a battery and a special keycode, the intelligent lock having key codes of all electronic keys whichcan open the lock and the key code of a setting tool, the setting toolbeing connected with the intelligent lock and the electronic key, saidmethod comprising: (1) acquiring power supply from the electronic keywhich is connected with the intelligent lock; (2) judging the key codeof the setting tool if it is identical with one of key codes of thesetting tool previously stored in the intelligent lock, if the key codeof the setting tool is identical with the key codes of the setting toolstored in the intelligent lock, allowing setting or cancel operationupon the electronic key and upon itself; (3) executing setting or canceloperation.
 20. The method according to claim 19, wherein when thesetting operation is executed and when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26) of the setting tool, if the intelligentlock has stored the key code of the setting tool, the key code of theelectronic key which is inserted into the insert hole of the settingtool (26) shall be stored into the intelligent lock.
 21. The methodaccording to claim 19, wherein when the cancel operation is executed andwhen the setting tool is inserted into the lock hole of the intelligentlock and there is an electronic key inserted into the keyhole (26) ofthe setting tool, if the intelligent has stored the key code of thesetting tool, depending on different special signals the control device(16) can clear out the key code of the key connected with theintelligent lock, clear out all key codes of all keys, or clear out allkey codes of all keys and the code of the setting tool.
 22. The methodaccording to claim 19, wherein when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the storing means (13) has no keycode the setting tool, the control device (16) shall store the key codeof the setting tool into the special memory unit of the storing means(13).
 23. The method according to claim 19, wherein the special signalis generated by a user from a switch device of the electronic key, theintelligent lock or the setting tool.
 24. (NEW) An intelligent locksystem comprising: an electronic key; and an intelligent lock, saidintelligent lock including a latch mechanism, a driving mechanism, adriving component, an electrical circuit board, a group of contacts forelectrical connection with the electronic key, wherein the electricalcircuit board is electrically connected with the driving component andthe group of contacts, said group of contacts being set inside a lock,said electrical circuit board including a storing means for storing aplurality of key codes, and a control device for controlling opening thelock, setting a key code, and canceling a key code. Favorable actionconstituting allowance is solicited.